<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>注册页面</title>
    <link href="css/global.css" rel="stylesheet" type="text/css" />
    
     
</head>

<body>
<div id="app">
<div id="header">
    <div id="register_header">
       
        <div class="register_header_right"><a href="index.html" class="blue">首页</a> | <a href="#" class="blue">商品展示页</a>  | <a href="#" class="blue">购物车</a> |  <a href="login.html" class="blue">登录</a></div>
    </div>
</div>
<div id="main">
    <div class="register_content">
        <div class="register_top_bg"></div>
        
        <div class="register_top_bg_mid">
            <div class="register_top_bg_two_left"></div>
            <div class="register_top_bg_two_right"></div>
            <div class="register_title_bg"><br/>您所提供的资料不会做其他用途，敬请安心填写。</div>
        </div>
        <div class="register_dotted_bg"></div>
        <div class="register_message">
				<dl class="register_row">
					<dt>用户名：</dt>
					<dd><input v-model="userInfo.username"id="username" type="text" class="register_input"/></dd>
				</dl>
           
                <dl class="register_row">
                    <dt>Email：</dt>
                    <dd><input v-model="userInfo.email"id="email" type="text" class="register_input"/></dd>
                </dl>
                <dl class="register_row">
                    <dt>昵称：</dt>
                    <dd><input v-model="userInfo.nickName" id="nickName" type="text" class="register_input"/></dd>
    
                </dl>
                <dl class="register_row">
                    <dt>密码：</dt>
                    <dd><input v-model="userInfo.password" id="pwd" type="password" class="register_input"/></dd>
                </dl>
                <dl class="register_row">
                    <dt>再输入一次密码：</dt>
                    <dd><input id="repwd" type="password" class="register_input"/></dd>
                </dl>
               <dl class="register_row">
                   <dt>备注：</dt>
                   <dd><input v-model="userInfo.note" id="note" type="text" class="register_input"/></dd>
               </dl>
                <dl class="register_row">
                    <dt>&nbsp;</dt>
                    <dd><input type="button" value="注册" @click="register"/></dd>
                </dl>
        </div>
    </div>
</div>
</div>
</body>
</html>
<script src="js/vue3.js"></script>
 <script src="js/axios.js"></script>
 <script src="js/request.js"></script>
 <script src="js/common.js"></script>
<script>
	const {createApp} = Vue.createApp({
	
	      data(){
	        return {
				userInfo:{
					username:null,
					password:null,
					nickName:null,
					email:null,
					note:null
				}
	        }
	      },
		  methods:{
			  register(){
				  request.post(MALL_USER_BASEURL + '/user/register',this.userInfo)
				  .then(resp => {
				  	if(resp.code===2000){
						location.href = 'login.html'
					}
				  })
			  }
		  },
		 
	
	    
	
	    }).mount('#app')
</script>
